Skip to content

Add dashboard gesture widgets, usage logging, and stats snapshot#776

Merged
multiplex55 merged 3 commits intomasterfrom
codex/add-gesture-widgets-to-dashboard
Jan 31, 2026
Merged

Add dashboard gesture widgets, usage logging, and stats snapshot#776
multiplex55 merged 3 commits intomasterfrom
codex/add-gesture-widgets-to-dashboard

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Surface mouse-gesture information in the dashboard (cheat sheet, recent usage, health) and allow quick editing/toggling from the dashboard.
  • Provide a dashboard-ready gesture data snapshot (DB + recent usage) so widgets render from a cached snapshot rather than performing IO in render paths.
  • Add simple gesture statistics and unit test coverage for detecting unbound/duplicate/disabled gestures.

Description

  • Added three dashboard widgets under src/dashboard/widgets/: gesture_cheat_sheet.rs (top-N gestures + primary binding + enable toggle + settings), gesture_recent.rs (recent gesture usage list + binding index), and gesture_health.rs (counts: zero bindings, duplicate tokens, disabled gestures + quick actions).
  • Registered new widgets and their default/settings hooks in src/dashboard/widgets/mod.rs and added helper actions gesture_focus_action and gesture_toggle_action for invoking gesture dialog focus and toggle behavior.
  • Extended dashboard snapshot with GestureSnapshot and wired DashboardDataCache::refresh_gestures to load mouse_gestures.json and a new usage log mouse_gestures_usage.json so widgets read from DashboardDataCache::snapshot() (src/dashboard/data_cache.rs).
  • Added gesture usage logging support in src/mouse_gestures/usage.rs and recorded usage in the gesture runtime (src/mouse_gestures/service.rs).
  • Introduced mouse_gestures::selection (serializable args for focus/toggle), mouse_gestures::stats (computes gesture stats), and updated GUI plumbing to watch gesture files and handle mg:dialog:focus and mg:toggle actions that open/focus the gesture dialog or toggle a gesture (src/gui/mod.rs, src/gui/mouse_gestures_dialog.rs).
  • Tests/coverage: added a unit test for gesture stats in src/mouse_gestures/stats.rs and updated tests/dashboard_config.rs to assert the new widget registry entries exist.

Testing

  • Added unit test gesture_stats_detects_unbound_and_duplicates in src/mouse_gestures/stats.rs and a registry assertion test in tests/dashboard_config.rs (these will run in CI).
  • Attempted to run the gesture stats test locally with cargo test gesture_stats_detects_unbound_and_duplicates -- --nocapture, but the build failed due to a missing system library required by a dependency (alsa for alsa-sys), so local test execution was blocked by the environment; tests are expected to run in CI where system deps are present.

Codex Task

@multiplex55 multiplex55 merged commit 14f3339 into master Jan 31, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-gesture-widgets-to-dashboard branch February 1, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant